#ifndef _INFORMATIONADAPTABILITY_H_
#define _INFORMATIONADAPTABILITY_H_

#include "schedulingheuristic.h"

/*Maps a task site level CT and the processor*/		
typedef struct TaskTimesMatrix_t {
	long double completionTime;
	int siteIndexCT;
	int procIndexCT;			
	long double transferTime;
	int siteIndexTT;
	long double executionTime;
	int siteIndexET;
	int procIndexET;			
} TaskTimesMatrix;

class InformationAdaptability : public SchedulingHeuristic {
	private:
		/*Structure to store the Estimated Times of Tasks onto sites according to information availability level*/
		TaskTimesMatrix *estimatedTaskTimes;
		
		/*Init Structures*/
		void initMatrix();
		/*Update the estimated task times matrix*/
		void updateMatrix();
		/*Release memory allocated to matrix*/
		void releaseMatrix();

	protected:
		
	public:
		/*Constructor*/
		InformationAdaptability();
		
		/*Destructor*/
		virtual ~InformationAdaptability();
		
		/*Schedule Method*/
		long double schedule(Grid *grid, Job *job);
		/*Simgrid simulation*/
		void doSimGridSimulation(SG_Task task_to_watch);
		
};

#endif //_INFORMATIONADAPTABILITY_H_
